The following is an excerpt from page 20 of the Warhammer Annual 2002 release with an expanded explanation by Gav Thorpe regarding when it is permissible for a crew to leave a war machine.
A war machine crew may never leave its war machine except to crew another war machine which has no crew left or if they flee. They don't have to be able to re-crew the other war machine immediately, but there must be at least one other abandoned machine for them to go to. Note that by extension this means that war machine crews can't declare charges. If they wish to re-crew another machine, all surviving crew members must move - you cannot split crews over several war engines, not re-crew a machine with any of its original crew left. To re-crew a machine they must move so that all the crew are within 1" of it. A war machine crew cannot fire their weapon on the same turn they re-crew it. While not physically crewing a machine, the crew should be treated as a skirmishing unit in all respects. Remember that while not within 1" of their machine, the crew must always flee if charged; they never declare charges or otherwise fight in close combat.